<?php
class RM_Video extends RM_Model_Flexible
{
    protected $_name = 'rm_video';

    public function fetchByUnit($unitID)
    {
        $sql = "
            SELECT *
            FROM  `".$this->_name."` m
            JOIN  `rm_unit_video` um ON m.id = um.feed_id
            WHERE m.unit_id='".$unitID."'
        ";

        return $this->_getBySQL($sql);
    }

    public function fetchProviderByUnit($unitID)
    {
        $sql = "
            SELECT provider
            FROM  `".$this->_name."` m
            JOIN  `rm_unit_video` um ON m.id = um.feed_id
            WHERE m.unit_id='".$unitID."'
        ";

        return $this->_getBySQL($sql);
    }

    public function getAll(){
        return;
    }

}